package com.ruoyi.etp.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 员工质检得分情况分析对象 etp_organization_performance
 *
 * @author xmj
 * @date 2025-09-09
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EtpOrganizationPerformance extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** ID */
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 员工id */
    @Excel(name = "员工id")
    private Long userId;
    /** 所属组织 */
    @Excel(name = "所属组织")
    private Long deptId;
    /** 平均分 */
    @Excel(name = "平均分")
    private BigDecimal avgScore;
    /** 最低分 */
    @Excel(name = "最低分")
    private BigDecimal minScore;
    /** 总时长(小时) */
    @Excel(name = "总时长(小时)")
    private BigDecimal totalDurationHours;
    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date createdAt;
    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Date updatedAt;
    /** 创建人 */
    @Excel(name = "创建人")
    private String createdBy;
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("deptId", getDeptId())
            .append("avgScore", getAvgScore())
            .append("minScore", getMinScore())
            .append("totalDurationHours", getTotalDurationHours())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
        .toString();
    }
}
